package cz.czu.pef.DataModelling.domainObjects;

import java.util.*;

public class TrainingTypeForRoleType extends IdObjectImpl implements IdObject
{
  private static final long serialVersionUID = 8685052052454786302L;

  /*
	 * Entity attributes
	 */
	private TrainingType trainingType;

	/*
	 * Relations
	 */
	private Set<RoleType> roleTypes;

	private long periodicityInSeconds;

	public TrainingTypeForRoleType()
	{
		super();
	}

	public TrainingTypeForRoleType(TrainingType trainingType, long periodicityInSeconds)
	{
		super();
		this.trainingType = trainingType;
		this.periodicityInSeconds = periodicityInSeconds;
	}

	public Set<RoleType> getRoleTypes()
	{
		return roleTypes;
	}

	public List<RoleType> getRoleTypesAsList()
	{
		return new ArrayList<RoleType>(getRoleTypes());
	}

	public long getPeriodicityInSeconds()
	{
		return periodicityInSeconds;
	}

	public void setPeriodicityInSeconds(long periodicityInSeconds)
	{
		this.periodicityInSeconds = periodicityInSeconds;
	}

	public TrainingType getTrainingType()
	{
		return trainingType;
	}

	
  public void setTrainingType(TrainingType trainingType)
  {
    this.trainingType = trainingType;
  }

  
  public void setRoleTypes(Set<RoleType> roleTypes)
  {
    this.roleTypes = roleTypes;
  }

  public String toString()
	{
		StringBuilder builder = new StringBuilder();
		builder.append("TrainingTypeForRoleType [trainingType=");
		builder.append(trainingType);
		builder.append(", roleTypes=");
		builder.append(roleTypes);
		builder.append(", periodicityInSeconds=");
		builder.append(periodicityInSeconds);
		builder.append(", toString()=");
		builder.append(super.toString());
		builder.append("]");
		return builder.toString();
	}
}
